<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
</head>
<script src="vue.js"></script>
<body>
<style>
    .red{
        color: red;
    }
</style>

    <div id="app">
        <h1 :class="hd">{{hd2}}</h1>
        <input type="text" v-model="hd2" >
    </div>

<script>
    var app=new Vue({
        el:'#app',
        data:{
            hd:'red',
            hd2:'后端君'
        }
    });

</script>
</body>
</html>